#pragma once

#include <sstream>
#include <fstream>
#include <ctime>
#include <string.h>
#include <queue>
#include <sys/stat.h>
#include <windows.h>

using namespace std;

namespace LogWriter
{
	class LogWriter
	{
	public:
		LogWriter(char *fn);
		LogWriter(void);
		~LogWriter(void);
		void Warn(char *format, ...);
		void Debug(char *format, ...);
		void Fatal(char *format, ...);
		void Info(char *format, ...);
	private:
		vector<char *> outputBuffer;
		HANDLE mutex;
		char* LogWriter::getTimeStamp();
		enum errorLevel {FATAL, WARN, DEBUG, INFO};
		void Log(errorLevel level, char *msg);
		char *fileName;
	};
}
